package com.mew.provide;


import com.google.common.eventbus.AllowConcurrentEvents;
import com.google.common.eventbus.Subscribe;
import com.mew.common.rest.sas.EFTSasRequest;
import com.mew.common.rest.sas.ExitGameSasRequest;
import com.mew.common.rest.sas.LogoutSasRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class EventBusSubscribe {

    @Autowired
    private SasFeignService sasFeignService;

    @Subscribe
    @AllowConcurrentEvents
    private void doLoginOut(LogoutSasRequest logoutSasRequest) {
         sasFeignService.logoutSas(logoutSasRequest);
    }

    @Subscribe
    @AllowConcurrentEvents
    private void doExitGame(ExitGameSasRequest exitGameSasRequest) {
        sasFeignService.exitGame(exitGameSasRequest);
    }

    @Subscribe
    @AllowConcurrentEvents
    private void doEftPay(EFTSasRequest eftSasRequest) {
        sasFeignService.eftPay(eftSasRequest);
    }


}
